.btn {
  &,
  &:link,
  &:visited {
    display: inline-block;

    position: relative;

    //Change for the <button> element

    border: none;
    border-radius: 10rem;
    padding: 1.5rem 4rem;

    font-size: $default-font-size;
    text-decoration: none;
    text-transform: uppercase;

    transition: all 0.2s;

    cursor: pointer;
  }

  &:hover {
    box-shadow: 0 1rem 2rem rgba($color-black, 0.2);

    transform: translateY(-3px);
    &::after {
      opacity: 0;

      transform: scaleX(1.4) scaleY(1.6);
    }
  }

  &:active,
  &:focus {
    outline: none;
    box-shadow: 0 0.5rem 1rem rgba($color-black, 0.2);

    transform: translateY(-1px);
  }

  &::after {
    display: inline-block;

    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;

    border-radius: 10rem;
    width: 100%;
    height: 100%;

    transition: all 0.4s;

    content: "";
  }
  &--white {
    color: $color-grey-dark;
    background-color: $color-white;
    &::after {
      background-color: $color-white;
    }
  }
  &--green {
    color: $color-white;
    background-color: $color-primary;
    &::after {
      background-color: $color-primary;
    }
  }
  &--animated {
    animation: moveInBottom 0.5s ease-out 0.75s;

    //   动画填充模式，设置为backwards，动画开始前保持动画第一帧的状态  这里的第一帧是隐藏

    animation-fill-mode: backwards;
  }
}
.btn-text {
  &:link,
  &:visited,
  &:focus {
    display: inline-block;

    border-bottom: 1px solid $color-primary;
    padding: 3px;

    font-size: $default-font-size;
    text-decoration: none;

    color: $color-primary;

    transition: all 0.2s;
  }

  &:hover {
    color: $color-white;
    background-color: $color-primary;

    box-shadow: 0 1rem 2rem rgba($color-black, 0.15);

    transform: translateY(-2px);
  }
  &:active {
    box-shadow: 0 0.5rem 1rem rgba($color-black, 0.15);

    transform: translateY(0);
  }
}
